← Back
Editing: index-legacy215.js
!function(){function t(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function u(e,o,a,i){var u=o&&o.prototype instanceof l?o:l,f=Object.create(u.prototype);return r(f,"_invoke",function(e,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(n,e){return a=n,i=0,u=t,p.n=e,c}};function m(e,r){for(i=e,u=r,n=0;!s&&l&&!o&&n<f.length;n++){var o,a=f[n],m=p.p,v=a[2];e>3?(o=v===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=m&&((o=e<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<v&&(o=e<3||a[0]>r||r>v)&&(a[4]=e,a[5]=r,p.n=v,i=0))}if(o||e>1)return c;throw s=!0,r}return function(o,f,v){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,v),i=f,u=v;(n=i<2?t:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.v=u);try{if(l=2,a){if(i||(o="next"),n=a[o]){if(!(n=n.call(a,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,i<2&&(i=0)}else 1===i&&(n=a.return)&&n.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((n=(s=p.n<0)?u:e.call(r,p))!==c)break}catch(n){a=t,i=1,u=n}finally{l=1}}return{value:n,done:s}}}(e,a,i),!0),f}var c={};function l(){}function f(){}function s(){}n=Object.getPrototypeOf;var p=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),m=s.prototype=l.prototype=Object.create(p);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,r(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t}return f.prototype=s,r(m,"constructor",s),r(s,"constructor",f),f.displayName="GeneratorFunction",r(s,i,"GeneratorFunction"),r(m),r(m,i,"Generator"),r(m,a,function(){return this}),r(m,"toString",function(){return"[object Generator]"}),(e=function(){return{w:u,m:v}})()}function r(t,n,e,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}r=function(t,n,e,o){function i(n,e){r(t,n,function(t){return this._invoke(n,e,t)})}n?a?a(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e:(i("next",0),i("throw",1),i("return",2))},r(t,n,e,o)}function o(t,n,e,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(r,o)}function a(t){return function(){var n=this,e=arguments;return new Promise(function(r,a){var i=t.apply(n,e);function u(t){o(i,r,a,u,c,"next",t)}function c(t){o(i,r,a,u,c,"throw",t)}u(void 0)})}}System.register(["./index-legacy93.js?v=1765440387","./utils-lib-legacy.js?v=1765440387","./useMethods-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387"],function(n,r){"use strict";var o,i,u,c,l,f,s,p,m,v,y,h,d,b,g,w,j,k,_,O,S,x,C,T,A,P,R,q,B;return{setters:[function(t){o=t._},function(t){i=t.ay,u=t.l,c=t.L,l=t.K,f=t.hI,s=t.hJ,p=t.o,m=t.a8,v=t.gf,y=t.aM,h=t.a6},function(t){d=t.b,b=t.k,g=t.N},function(t){w=t.c,j=t.a,k=t.u},function(t){_=t.k,O=t.r,S=t.c,x=t.w,C=t.a5,T=t.q,A=t.v,P=t.e,R=t.A,q=t.y,B=t.x},null,null],execute:function(){var G=i().refs.isRefreshTemplateList,E=_({isRefresh:!0}),N=O([]),I=function(){var t=a(e().m(function t(n,r,o,i){var u,c,l;return e().w(function(t){for(;;)switch(t.n){case 0:return u=i.label,c=i.value,l=function(){var t=a(e().m(function t(n,r){var o,a;return e().w(function(t){for(;;)switch(t.n){case 0:o=n.id,a=c,t.n="delete"===a?1:3;break;case 1:return t.n=2,s({data:JSON.stringify({template_id:o})});case 2:return t.a(2,t.v);case 3:return t.a(2)}},t)}));return function(n,e){return t.apply(this,arguments)}}(),t.n=1,n({title:"批量".concat(u,"编排模板"),content:"批量".concat(u,"已选的编排模板,是否继续操作!"),column:[{label:"模板名",prop:"name"},w()],onConfirm:function(){var t=a(e().m(function t(){return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,r(l);case 1:return G.value=!0,t.a(2,!1)}},t)}));return function(){return t.apply(this,arguments)}}()});case 1:return t.a(2)}},t)}));return function(n,e,r,o){return t.apply(this,arguments)}}(),J=[{active:!0,label:"添加",type:"button",onClick:function(){b(function(){return G.value=!0})}},{label:"需求反馈",type:"link",class:"ml-[2rem]",onClick:function(){g()}}],M=function(){return u({component:function(){return c(function(){return r.import("./add-compose-template-legacy.js?v=1765440387")},void 0,r.meta.url)},title:"编辑Yaml模板",area:64,btn:"保存",compData:{row:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}})},D=function(){var t=a(e().m(function t(n){return e().w(function(t){for(;;)switch(t.n){case 0:u({component:function(){return c(function(){return r.import("./pull-mirror-select-dialog-legacy.js?v=1765440387")},void 0,r.meta.url)},compData:n,title:"拉取镜像",btn:"确定",area:60});case 1:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}(),F=function(){var t=a(e().m(function t(n){var o;return e().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,l({request:f({id:n.id})});case 1:if(!(o=t.v).status){t.n=2;break}return u({component:function(){return c(function(){return r.import("./clear-confirm-legacy.js?v=1765440387")},void 0,r.meta.url)},title:"删除编排模板【".concat(n.name,"】"),area:55,btn:!0,compData:{confirmMsg:"检测到编排模板【".concat(n.name,"】,已应用到容器编排【").concat(o.msg,"】"),confirmCheck:"删除编排模板【".concat(n.name,"】以及已应用的容器编排和创建的容器"),confirmEvent:function(){var t=a(e().m(function t(r,o){return e().w(function(t){for(;;)switch(t.n){case 0:l({request:s({data:JSON.stringify({template_id:n.id,status:r})}),message:!0,success:function(){o(),G.value=!0}});case 1:return t.a(2)}},t)}));return function(n,e){return t.apply(this,arguments)}}()}}),t.a(2);case 2:return t.n=3,p({type:"calc",title:"删除编排模板【".concat(n.name,"】"),content:"删除编排模板【".concat(n.name,"】,是否继续操作?")});case 3:l({request:s({data:JSON.stringify({template_id:n.id})}),message:!0,success:function(){return G.value=!0}}),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.a(2)}},t,null,[[0,4]])}));return function(n){return t.apply(this,arguments)}}(),L=m([{label:"删除模板",value:"delete",event:I}]),W=function(){var t=a(e().m(function t(n){var r;return e().w(function(t){for(;;)switch(t.n){case 0:if(G.value=!1,E.isRefresh){t.n=1;break}return t.a(2,{data:d({limit:n.limit,list:N.value,p:n.p})||[],total:N.value.length});case 1:return E.isRefresh=!1,t.n=2,l({request:v(),data:Array});case 2:return r=t.v,N.value=r,t.a(2,{data:d({limit:n.limit,list:N.value,p:n.p})||[],total:N.value.length})}},t)}));return function(n){return t.apply(this,arguments)}}(),H={class:"relative p-2rem"},K={class:"flex items-center"};n("default",S({__name:"index",setup:function(n){var e=i().refs.isRefreshTemplateList,r=y({options:J}).BtOperation;x(function(){return e.value},function(t){e.value&&(E.isRefresh=!0,s())});var a=h({request:function(t){return W(t)},columns:[j(),{label:"模板名",prop:"name",minWidth:100},{label:"路径",prop:"path",minWidth:100,isCustom:!0},{label:"备注",prop:"remark",minWidth:100,isCustom:!0},k([{onClick:M,title:"编辑"},{onClick:D,width:60,title:"拉取镜像"},{onClick:F,title:"删除"}])],extension:[L]}),u=a.BtTable,c=a.BtPage,l=a.BtBatch,f=a.BtColumn,s=a.refresh;a.param;return C(function(){E.isRefresh=!0,N.value=[]}),function(n,e){var a=o;return T(),A("div",H,[P(a,null,{"header-left":R(function(){return[q("div",K,[P(B(r))])]}),"header-right":R(function(){return[P(B(f))]}),content:R(function(){return[P(B(u),{key:"templateTable","max-height":410})]}),"footer-left":R(function(){return[P(B(l))]}),"footer-right":R(function(){return[P(B(c))]}),popup:R(function(){return t(e[0]||(e[0]=[]))}),_:1})])}}}))}}})}();
Save File
Cancel